package com.group.yztcedu.playlive.main.me.precenter;

import android.content.Context;

import com.group.yztcedu.playlive.bean.MyDataBean;
import com.group.yztcedu.playlive.main.me.View.IMeActivity;
import com.group.yztcedu.playlive.main.me.View.MeFollowActivity;
import com.group.yztcedu.playlive.main.me.model.IMyActivitymodel;
import com.group.yztcedu.playlive.main.me.model.MyActivityFragmentModel;

import java.util.List;


/**
 * Created by Administrator on 2016/8/7.
 */
public class MyActivityPresenter implements IMyActivityPrecenter {

    private IMyActivitymodel model;
    private IMeActivity view;

    public MyActivityPresenter(MeFollowActivity view) {
        this.view =  view;
        model = new MyActivityFragmentModel();
    }

    @Override
    public void initData(String sql, Context context) {
        model.onLoadData(sql, context, new IMyActivitymodel.OnLoadCategoryListener() {
            @Override
            public void onSuccess(List<MyDataBean> dataBean) {
                view.LodeData(dataBean);
            }

            @Override
            public void onFail(String msg) {

            }
        });

    }

}
